package httplib.GetReceivingAddressList;

import httplib.BaseProxy;
import httplib.HttpProxyListener;
import httplib.VolleyHttpHelper;

/**
 * Description :
 * Author : Liun
 * Date   : 2016 2016/11/23 17:02.
 * Email  : liun_coolman@foxmail.com
 */

public class ReceivingAddressListProxy extends BaseProxy {
    public void doRequest(final ReceivingAddressListInput input, final HttpProxyListener<GetReceivingAddressListOutput> onListener) {
        new VolleyHttpHelper().PostJson(GetReceivingAddressListOutput.class, input, new HttpProxyListener() {
            @Override
            public void NetError(int code, String message) {
                onListener.NetError(code, message);
            }

            @Override
            public void ServiceError(int code, String message) {
                onListener.ServiceError(code, message);
            }

            @Override
            public void Success(Object o) {
                GetReceivingAddressListOutput body = (GetReceivingAddressListOutput) o;
                onListener.Success(body);
            }
        });
    }
}
